import request from '@/utils/request'


// 查询团委组织列表
export function organizeList(query) {
    return request({
      url: '/league/organize/list',
      method: 'get',
      params: query
    })
  }

// 查询团委组织树形
export function organizeTree(query) {
    return request({
        url: '/league/organize/tree',
        method: 'get',
        params: query
    })
}

// 导出团委组织
export function exportOrganize(query) {
    return request({
        url: '/league/organize/export',
        method: 'post',
        data: query
    })
}

// 新增团委组织
export function addOrganize(query) {
    return request({
        url: '/league/organize',
        method: 'post',
        data: query
    })
}

// 修改团委组织
export function putOrganize(query) {
    return request({
        url: '/league/organize',
        method: 'put',
        data: query
    })
}

// 删除团委组织
export function removeOrganize(ids) {
    return request({
        url: '/league/organize/' + ids,
        method: 'delete'
    })
}


// 团委组织下载模板
export function organizeTemplate(query) {
    return request({
      url: '/league/organize/downloadTemplate',
      method: 'get',
      responseType: 'blob',
      params: query
    })
  }


// 学生社团组织下载模板
export function studentOrganizeTemplate(query) {
    return request({
      url: '/league/union/downloadTemplate',
      method: 'get',
      responseType: 'blob',
      params: query
    })
  }

// 学生社团组织列表
export function studentOrganizeList(query) {
    return request({
        url: '/league/union/list',
        method: 'get',
        params: query
    })
}

// 学生社团组织--添加
export function addStudentOrganize(query) {
    return request({
        url: '/league/union',
        method: 'post',
        data: query
    })
}

// 学生社团组织--修改
export function editStudentOrganize(query) {
    return request({
        url: '/league/union',
        method: 'put',
        data: query
    })
}

// 学生社团组织--删除
export function delStudentOrganize(ids) {
    return request({
        url: '/league/union/' + ids,
        method: 'delete'
    })
}